projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b88eb32
)
sandbox: tpm: Fix nvwrite command
author
Che-Liang Chiou
<
[email protected]
>
Sun, 10 Nov 2013 17:27:08 +0000
(10:27 -0700)
committer
Simon Glass
<
[email protected]
>
Thu, 9 Jan 2014 00:26:17 +0000
(17:26 -0700)
The original codes misused recvbuf in source buffer instead of sendbuf,
and read from incorrect offset 14 instead of 22.
Signed-off-by: Che-Liang Chiou <
[email protected]
>
Signed-off-by: Simon Glass <
[email protected]
>
Reviewed-by: Simon Glass <
[email protected]
>
Tested-by: Che-Liang Chiou <
[email protected]
>
drivers/tpm/tpm_tis_sandbox.c
patch
|
blob
|
history
diff --git
a/drivers/tpm/tpm_tis_sandbox.c
b/drivers/tpm/tpm_tis_sandbox.c
index 80cf734f1c232cb15b3a2144d6d63e192ae35ff7..ed4b0391278307c77ffefcd6f7464b30527149d6 100644
(file)
--- a/
drivers/tpm/tpm_tis_sandbox.c
+++ b/
drivers/tpm/tpm_tis_sandbox.c
@@
-190,9
+190,7
@@
int tis_sendrecv(const u8 *sendbuf, size_t send_size,
if (seq < 0)
return -1;
printf("tpm: nvwrite index=%#02x, len=%#02x\n", index, length);
- memcpy(&tpm->nvdata[seq],
- recvbuf + TPM_RESPONSE_HEADER_LENGTH + sizeof(uint32_t),
- length);
+ memcpy(&tpm->nvdata[seq], sendbuf + 22, length);
*recv_len = 12;
memset(recvbuf, '\0', *recv_len);
break;